<extend name="base"/>
<block name="body">

<div id="wechat_auth" class="r_con_wrap">
    <script language="javascript">$(document).ready(wechat_obj.auth_init);</script>
    <div class="tips_info">
		1. <span>订阅号并已通过微信认证</span>可使用自定义菜单。<br>
		2. <span>服务号</span>无需微信认证可直接使用自定义菜单，<span>服务号并已通过微信认证</span>可使用高级接口。<br>
		3. 在公众平台申请接口使用的<span>AppId</span>和<span>AppSecret</span>，然后填入下边表单。<br>
		4. <span>服务认证号</span>请在微信公众平台高级接口处的<span>网页服务--&gt;网页账号--&gt;网页授权获取用户基本信息</span>设置授权回调页面域名为<span>{:C('WEB_ABSOLUTE_URL')}</span>
	</div>
    <form id="wechat_auth_form" action="{:U('auth')}" method="post" class="r_con_form">
        <div class="rows">
            <label>AppId <span class="fc_red">*</span></label>
            <span class="input"><input name="appid" value="{$userconfig.appid}" type="text" class="form_input" size="35" maxlength="18" notnull></span>
            <div class="clear"></div>
        </div>
        <div class="rows">
            <label>AppSecret <span class="fc_red">*</span></label>
            <span class="input"><input name="appsecret" value="{$userconfig.appsecret}" type="text" class="form_input" size="35" maxlength="32" notnull></span>
            <div class="clear"></div>
        </div>
        <div class="rows">
			<label>公众号类型</label>
			<span class="input">
				<input type="radio" value="0" name="certified" <if condition="$userconfig.certified eq 0"> checked=""</if>><span class="tips">订阅号</span>
				<input type="radio" value="1" name="certified" <if condition="$userconfig.certified eq 1"> checked=""</if>><span class="tips">订阅认证号</span>
				<input type="radio" value="2" name="certified" <if condition="$userconfig.certified eq 2"> checked=""</if>><span class="tips">服务号</span>
				<input type="radio" value="3" name="certified" <if condition="$userconfig.certified eq 3"> checked=""</if>><span class="tips">服务认证号</span>			
			</span>
			<div class="clear"></div>
		</div>
        <!-- <div class="rows">
            <label>微信认证</label>
            <span class="input">
                <input type="checkbox" value="1" name="certified"  <eq name="userconfig.certified" value="1">checked="checked"</eq>/> <span class="tips">如果您的公众号已通过微信认证，请勾选此选项</span><br />
                <div class="oauth_tips">
                    <h1><strong>这个有什么用？</strong></h1>
				                    通过微信认证的公众号可以使用微信最新推出的9大新接口<br />
				                    请在微信公众平台高级接口处的“<span class="fc_red">OAuth2.0网页授权</span>​”设置授权回调页面域名为“<span class="fc_red">{:C('WEB_ABSOLUTE_URL')}</span>”<br />
                    <span class="fc_red">开微信认证选项后，客户端中所有需要用户登录的页面，将直接读取用户的微信资料进行一键登录，免去用户注册的步骤</span><br />
                    <span class="fc_red">开启语音关键词回复，您的微信帐号必须已通过微信认证并在高级接口中开启了语音识别，系统将自动识别出语音内容并启用模糊匹配方式进行关键字回复</span>
                </div>
            </span>
            <div class="clear"></div>
        </div> -->
        <div class="rows">
            <label></label>
            <span class="input"><input type="submit" class="btn_green" name="submit_button" value="提交保存" /></span>
            <div class="clear"></div>
        </div>
        <input type="hidden" name="do_action" value="wechat.auth">
    </form>
</div> 

</block>